import sfetch from 'sfetch'
import { api_Ip, } from './serverIp'
/**
   *appuseranalysis/getagentchangeList成长历程(App)
   */
export const getAgentchangeApp = (search) => {
    let body = {};
    return new Promise((resolve, reject) => {
        sfetch.get({
            url: `${api_Ip}/appuseranalysis/getagentchangeList` + search,
            body
        }).then((data) => {
            if (data.ok) {
                resolve(data.json)
            } else {
                reject(data)
            }
        });
    });

}
/**
   *certificate/allcertificate/称号个人名片显示荣誉(分享)
   */
export const allCertificateShare = (search) => {
    let body = {};
    return new Promise((resolve, reject) => {
        sfetch.get({
            url: `${api_Ip}/certificate/allcertificate` + search,
            body
        }).then((data) => {
            if (data.ok) {
                resolve(data.json)
            } else {
                reject(data)
            }
        });
    });

}
//App个人名片
export const myHomeApp = (search) => {
    let body = {};
    return new Promise((resolve, reject) => {
        sfetch.get({
            url: api_Ip + '/appuseranalysis/myhome' + search,
            body: body
        }).then((data) => {
            if (data.ok) {
                resolve(data.json)
            } else {
                reject(data)
            }
        });
    });
}
/**
*honor/myhonor//称号个人名片显示荣誉App
*/
export const myHonorApp = (search) => {
    let body = {}
    return new Promise((resolve, reject) => {
        sfetch.get({
            url: `${api_Ip}/honor/myhonor` + search,
            body
        }).then((data) => {
            if (data.ok) {
                resolve(data.json)
            } else {
                reject(data)
            }
        });
    });

}
/**
 * 34.查询个人名片点赞总数/useranalysis/sumoperation
*/
export const sumOperation = (search) => {

    let body = {};
    return new Promise((resolve, reject) => {
        sfetch.get({
            url: `${api_Ip}/appuseranalysis/sumoperation` + search,
            body
        }).then((data) => {
            if (data.ok) {
                resolve(data.json)
            } else {
                reject(data)
            }
        });
    });

}
/**
 * 个人名片点赞接口/useranalysis/opcardislike
*/
export const opcardIslike = (search) => {

    let body = {};
    return new Promise((resolve, reject) => {
        sfetch.get({
            url: `${api_Ip}/appuseranalysis/opcardislike` + search,
            body
        }).then((data) => {
            if (data.ok) {
                resolve(data.json)
            } else {
                reject(data)
            }
        });
    });

}